package com.xing.service;

import com.xing.entity.pojo.Article;
import com.xing.entity.vo.AjaxMessage;
import com.xing.entity.vo.ArticlePage;
import org.apache.ibatis.annotations.Param;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;

public interface ArticleService {
    int deleteByPrimaryKey(String newsId);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(String newsId);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKeyWithBLOBs(Article record);

    int updateByPrimaryKey(Article record);

    Boolean deleteckArticle(String[] ids);

    ArticlePage findByPage(Integer currentPage, Integer rows, String typeName, Byte newsState);

    Article findByTitle(String title);

    AjaxMessage fileUploadAdd(Article article, MultipartFile multipartFile, HttpServletRequest request, HttpSession session);

    AjaxMessage updataAjaxArticle( Article article, MultipartFile multipartFile, HttpServletRequest request);
}
